#include "gtkentry.h"
#include "gtkbutton.h"
#include "gtkhseparator.h"
-#include "gtktooltips.h"
#include "gtkinvisible.h"
#include "gtkmenuitem.h"
#include "gtkmain.h"
GtkWidget *cur_sample;
GtkWidget *colorsel;
- /* Tooltips group */
- GtkTooltips *tooltips;
-
/* Window for grabbing on */
GtkWidget *dropper_grab_widget;
guint32 grab_time;
priv->old_sample = gtk_drawing_area_new ();
priv->cur_sample = gtk_drawing_area_new ();
- /* We need enter/leave to do tooltips */
- gtk_widget_add_events (priv->old_sample,
- GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK);
- gtk_widget_add_events (priv->cur_sample,
- GDK_ENTER_NOTIFY_MASK | GDK_LEAVE_NOTIFY_MASK);
-
gtk_box_pack_start (GTK_BOX (priv->sample_area), priv->old_sample,
TRUE, TRUE, 0);
gtk_box_pack_start (GTK_BOX (priv->sample_area), priv->cur_sample,
color_sample_setup_dnd (colorsel, priv->old_sample);
color_sample_setup_dnd (colorsel, priv->cur_sample);
- gtk_tooltips_set_tip (priv->tooltips,
- priv->old_sample,
- _("The previously-selected color, for comparison to the color you're selecting now. You can drag this color to a palette entry, or select this color as current by dragging it to the other color swatch alongside."), NULL);
+ gtk_widget_set_tooltip_text (priv->old_sample,
+ _("The previously-selected color, for comparison to the color you're selecting now. You can drag this color to a palette entry, or select this color as current by dragging it to the other color swatch alongside."));
- gtk_tooltips_set_tip (priv->tooltips,
- priv->cur_sample,
- _("The color you've chosen. You can drag this color to a palette entry to save it for use in the future."), NULL);
+ gtk_widget_set_tooltip_text (priv->cur_sample,
+ _("The color you've chosen. You can drag this color to a palette entry to save it for use in the future."));
gtk_widget_show_all (priv->sample_area);
}
g_signal_connect (retval, "drag_data_received",
G_CALLBACK (palette_drop_handle), colorsel);
- gtk_tooltips_set_tip (priv->tooltips,
- retval,
- _("Click this palette entry to make it the current color. To change this entry, drag a color swatch here or right-click it and select \"Save color here.\""),
- NULL);
+ gtk_widget_set_tooltip_text (retval,
+ _("Click this palette entry to make it the current color. To change this entry, drag a color swatch here or right-click it and select \"Save color here.\""));
return retval;
}
g_object_set_data (G_OBJECT (adjust), I_("COLORSEL"), colorsel);
*spinbutton = gtk_spin_button_new (adjust, 10.0, 0);
- gtk_tooltips_set_tip (priv->tooltips, *spinbutton, tooltip, NULL);
+ gtk_widget_set_tooltip_text (*spinbutton, tooltip);
g_signal_connect (adjust, "value_changed",
G_CALLBACK (adjustment_changed),
priv->default_set = FALSE;
priv->default_alpha_set = FALSE;
- priv->tooltips = gtk_tooltips_new ();
- g_object_ref_sink (priv->tooltips);
-
top_hbox = gtk_hbox_new (FALSE, 12);
gtk_box_pack_start (GTK_BOX (colorsel), top_hbox, FALSE, FALSE, 0);
gtk_hsv_set_metrics (GTK_HSV (priv->triangle_colorsel), 174, 15);
gtk_box_pack_start (GTK_BOX (top_hbox), vbox, FALSE, FALSE, 0);
gtk_box_pack_start (GTK_BOX (vbox), priv->triangle_colorsel, FALSE, FALSE, 0);
- gtk_tooltips_set_tip (priv->tooltips, priv->triangle_colorsel,
- _("Select the color you want from the outer ring. Select the darkness or lightness of that color using the inner triangle."), NULL);
+ gtk_widget_set_tooltip_text (priv->triangle_colorsel,
+ _("Select the color you want from the outer ring. Select the darkness or lightness of that color using the inner triangle."));
hbox = gtk_hbox_new (FALSE, 6);
gtk_box_pack_end (GTK_BOX (vbox), hbox, FALSE, FALSE, 0);
gtk_widget_show (GTK_WIDGET (picker_image));
gtk_box_pack_end (GTK_BOX (hbox), button, FALSE, FALSE, 0);
- gtk_tooltips_set_tip (priv->tooltips,
- button,
- _("Click the eyedropper, then click a color anywhere on your screen to select that color."), NULL);
+ gtk_widget_set_tooltip_text (button,
+ _("Click the eyedropper, then click a color anywhere on your screen to select that color."));
top_right_vbox = gtk_vbox_new (FALSE, 6);
gtk_box_pack_start (GTK_BOX (top_hbox), top_right_vbox, FALSE, FALSE, 0);
adjust = GTK_ADJUSTMENT (gtk_adjustment_new (0.0, 0.0, 255.0, 1.0, 1.0, 0.0));
g_object_set_data (G_OBJECT (adjust), I_("COLORSEL"), colorsel);
priv->opacity_slider = gtk_hscale_new (adjust);
- gtk_tooltips_set_tip (priv->tooltips,
- priv->opacity_slider,
- _("Transparency of the color."), NULL);
+ gtk_widget_set_tooltip_text (priv->opacity_slider,
+ _("Transparency of the color."));
gtk_label_set_mnemonic_widget (GTK_LABEL (priv->opacity_label),
priv->opacity_slider);
gtk_scale_set_draw_value (GTK_SCALE (priv->opacity_slider), FALSE);
GINT_TO_POINTER (COLORSEL_OPACITY));
gtk_table_attach_defaults (GTK_TABLE (table), priv->opacity_slider, 1, 7, 4, 5);
priv->opacity_entry = gtk_entry_new ();
- gtk_tooltips_set_tip (priv->tooltips,
- priv->opacity_entry,
- _("Transparency of the color."), NULL);
+ gtk_widget_set_tooltip_text (priv->opacity_entry,
+ _("Transparency of the color."));
gtk_widget_set_size_request (priv->opacity_entry, 40, -1);
g_signal_connect (priv->opacity_entry, "activate",
g_signal_connect (priv->hex_entry, "focus_out_event",
G_CALLBACK (hex_focus_out), colorsel);
- gtk_tooltips_set_tip (priv->tooltips,
- priv->hex_entry,
- _("You can enter an HTML-style hexadecimal color value, or simply a color name such as 'orange' in this entry."), NULL);
+ gtk_widget_set_tooltip_text (priv->hex_entry,
+ _("You can enter an HTML-style hexadecimal color value, or simply a color name such as 'orange' in this entry."));
gtk_entry_set_width_chars (GTK_ENTRY (priv->hex_entry), 7);
gtk_table_attach_defaults (GTK_TABLE (table), priv->hex_entry, 1, 5, 5, 6);
priv->dropper_grab_widget = NULL;
}
- if (priv->tooltips)
- {
- g_object_unref (priv->tooltips);
- priv->tooltips = NULL;
- }
-
GTK_OBJECT_CLASS (gtk_color_selection_parent_class)->destroy (object);
}
g_signal_connect (impl->filter_combo, "changed",
G_CALLBACK (filter_combo_changed), impl);
+ gtk_widget_set_tooltip_text (impl->filter_combo,
+ _("Select which types of files are shown"));
+
return impl->filter_combo;
}
tip = data.tip;
}
- gtk_tooltips_set_tip (impl->tooltips, impl->browse_shortcuts_add_button, tip, NULL);
+ gtk_widget_set_tooltip_text (impl->browse_shortcuts_add_button, tip);
g_free (tip);
}
}
gchar *tip;
tip = g_strdup_printf (_("Remove the bookmark '%s'"), name);
- gtk_tooltips_set_tip (impl->tooltips, impl->browse_shortcuts_remove_button,
- tip, NULL);
+ gtk_widget_set_tooltip_text (impl->browse_shortcuts_remove_button, tip);
g_free (tip);
}
TRUE,
G_CALLBACK (add_bookmark_button_clicked_cb));
gtk_box_pack_start (GTK_BOX (hbox), impl->browse_shortcuts_add_button, TRUE, TRUE, 0);
- gtk_tooltips_set_tip (impl->tooltips, impl->browse_shortcuts_add_button,
- _("Add the selected folder to the Bookmarks"), NULL);
+ gtk_widget_set_tooltip_text (impl->browse_shortcuts_add_button,
+ _("Add the selected folder to the Bookmarks"));
/* Remove bookmark button */
TRUE,
G_CALLBACK (remove_bookmark_button_clicked_cb));
gtk_box_pack_start (GTK_BOX (hbox), impl->browse_shortcuts_remove_button, TRUE, TRUE, 0);
- gtk_tooltips_set_tip (impl->tooltips, impl->browse_shortcuts_remove_button,
- _("Remove the selected bookmark"), NULL);
+ gtk_widget_set_tooltip_text (impl->browse_shortcuts_remove_button,
+ _("Remove the selected bookmark"));
return vbox;
}
return path_bar;
}
-static void
-set_filter_tooltip (GtkWidget *widget,
- gpointer data)
-{
- GtkTooltips *tooltips = (GtkTooltips *)data;
-
- if (GTK_IS_BUTTON (widget))
- gtk_tooltips_set_tip (tooltips, widget,
- _("Select which types of files are shown"),
- NULL);
-}
-
-static void
-realize_filter_combo (GtkWidget *combo,
- gpointer data)
-{
- GtkFileChooserDefault *impl = (GtkFileChooserDefault *)data;
-
- gtk_container_forall (GTK_CONTAINER (combo),
- set_filter_tooltip,
- impl->tooltips);
-}
-
/* Creates the widgets for the files/folders pane */
static GtkWidget *
file_pane_create (GtkFileChooserDefault *impl,
widget = filter_create (impl);
- g_signal_connect (widget, "realize",
- G_CALLBACK (realize_filter_combo), impl);
-
gtk_widget_show (widget);
gtk_box_pack_end (GTK_BOX (impl->filter_combo_hbox), widget, FALSE, FALSE, 0);
str = _("Type a file name");
- gtk_tooltips_set_tip (impl->tooltips, impl->location_button, str, NULL);
+ gtk_widget_set_tooltip_text (impl->location_button, str);
atk_object_set_name (gtk_widget_get_accessible (impl->location_button), str);
}
#include "gtkradiobutton.h"
#include "gtklabel.h"
#include "gtktable.h"
-#include "gtktooltips.h"
#include "gtkcelllayout.h"
#include "gtkcellrenderertext.h"
#include "gtkalignment.h"
GtkWidget *paper_size_combo;
GtkWidget *paper_size_label;
GtkWidget *paper_size_eventbox;
- GtkTooltips *tooltips;
GtkWidget *portrait_radio;
GtkWidget *reverse_portrait_radio;
g_free (left);
g_free (right);
- gtk_tooltips_set_tip (GTK_TOOLTIPS (priv->tooltips),
- priv->paper_size_eventbox, str, NULL);
+ gtk_widget_set_tooltip_text (priv->paper_size_eventbox, str);
g_free (str);
g_object_unref (page_setup);
else
{
gtk_label_set_text (label, "");
- gtk_tooltips_set_tip (GTK_TOOLTIPS (priv->tooltips),
- priv->paper_size_eventbox, NULL, NULL);
+ gtk_widget_set_tooltip_text (priv->paper_size_eventbox, NULL);
if (priv->last_setup)
g_object_unref (priv->last_setup);
priv->last_setup = NULL;
GTK_EXPAND|GTK_FILL, 0, 0, 0);
- priv->tooltips = gtk_tooltips_new ();
-
g_signal_connect (priv->paper_size_combo, "changed", G_CALLBACK (paper_size_changed), ps_dialog);
g_signal_connect (priv->printer_combo, "changed", G_CALLBACK (printer_changed_callback), ps_dialog);
gtk_combo_box_set_active (GTK_COMBO_BOX (priv->printer_combo), 0);